home *** CD-ROM | disk | FTP | other *** search
- #ifndef _TRACE_H_
- #define _TRACE_H_
- /*
- * $RCSfile: trace.h,v $
- * $Revision: 1.1.1.1 $
- * $Date: 1996/05/04 21:56:07 $
- */
- /**********************************************************************
- * EXODUS Database Toolkit Software
- * Copyright (c) 1991 Computer Sciences Department, University of
- * Wisconsin -- Madison
- * All Rights Reserved.
- *
- * Permission to use, copy, modify and distribute this software and its
- * documentation is hereby granted, provided that both the copyright
- * notice and this permission notice appear in all copies of the
- * software, derivative works or modified versions, and any portions
- * thereof, and that both notices appear in supporting documentation.
- *
- * THE COMPUTER SCIENCES DEPARTMENT OF THE UNIVERSITY OF WISCONSIN --
- * MADISON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" CONDITION.
- * THE DEPARTMENT DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY DAMAGES
- * WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
- *
- * The EXODUS Project Group requests users of this software to return
- * any improvements or extensions that they make to:
- *
- * EXODUS Project Group
- * c/o David J. DeWitt and Michael J. Carey
- * Computer Sciences Department
- * University of Wisconsin -- Madison
- * Madison, WI 53706
- *
- * or exodus@cs.wisc.edu
- *
- * In addition, the EXODUS Project Group requests that users grant the
- * Computer Sciences Department rights to redistribute these changes.
- **********************************************************************/
-
- #include "global_trace.h"
-
- /*
- * Macros for tracing
- *
- * Depend on the global variable Trace for information
- */
-
- #ifdef DEBUG
-
- #define TRACING ENABLED
-
- #else
-
- #define TRACING DISABLED
-
- #endif
-
-
- #if TRACING IS_ENABLED
-
-
- #define TRACE(_Area, _Level) ( \
- \
- (((_Area) & TraceFlags) && (checkTraceLevel(_Area, _Level))) ? ( \
- printf("%s %-22s line: %4d\n", TraceName, __FILE__, __LINE__), \
- fflush(stdout) \
- ) : (TraceFlags) \
- )
-
-
- #define TRPRINT(_Area, _Level, _Message) ( \
- \
- ((_Area & TraceFlags) && (checkTraceLevel(_Area, _Level))) ? ( \
- printf("%s %-22s line: %4d ", TraceName, __FILE__, __LINE__), \
- printf _Message, \
- printf("\n"), \
- fflush(stdout) \
- ) : (TraceFlags) \
- )
-
-
- #else
-
-
- #define TRACE(_Area, _Level)
-
- #define TRPRINT(_Area, _Message, _Level)
-
-
- #endif
- #endif /* _TRACE_H_ */
-